package com.origin.chaos.framework.manage.controller;

import com.alibaba.fastjson.JSONObject;
import com.origin.chaos.common.bean.vo.Result;
import com.origin.chaos.security.serivce.IUserService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author: tao.ding
 * @date 2021-07-30
 */
@RestController
@RequestMapping("/api/user-manage")
@Api(tags = "用户管理模块")
@Slf4j
public class UserManageController {

    private IUserService userService;

    @GetMapping("/info")
    @ApiOperation("获取当前用户信息")
    public Result<JSONObject> getUserInfo(){
        return Result.ofBody(this.userService.manageUserInfo());
    }

    @Autowired
    public void setUserService(IUserService userService) {
        this.userService = userService;
    }
}
